package cn.yomigaeri.signal.config;

import com.github.benmanes.caffeine.cache.Cache;
import com.github.benmanes.caffeine.cache.Caffeine;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @ClassName: CacheConfig
 * @Package: cn.yomigaeri.signal.config
 * @Description:
 * @Author Yomigaeri
 * @Create 2025/6/5 11:58
 * @Version 1.0
 */
@Configuration
public class CacheConfig {

    @Bean
    public Cache<String, String> caffeineCache() {
        return Caffeine.newBuilder()
                .maximumSize(100) // 最大缓存条目数
                .build();
    }
}